import { TweenLite } from "./TweenLite";
import { TweenEvent } from "events/TweenEvent";
import { TweenCore } from "core/TweenCore";
import { PropTween } from "core/PropTween";
import { OverwriteManager } from "./OverwriteManager";
import { TweenPlugin } from "plugins/TweenPlugin";
import { AutoAlphaPlugin } from "plugins/AutoAlphaPlugin";
import { EndArrayPlugin } from "plugins/EndArrayPlugin";
import { FramePlugin } from "plugins/FramePlugin";
import { RemoveTintPlugin } from "plugins/RemoveTintPlugin";
import { TintPlugin } from "plugins/TintPlugin";
import { VisiblePlugin } from "plugins/VisiblePlugin";
import { VolumePlugin } from "plugins/VolumePlugin";
import { BevelFilterPlugin } from "plugins/BevelFilterPlugin";
import { BezierPlugin } from "plugins/BezierPlugin";
import { BezierThroughPlugin } from "plugins/BezierThroughPlugin";
import { BlurFilterPlugin } from "plugins/BlurFilterPlugin";
import { ColorMatrixFilterPlugin } from "plugins/ColorMatrixFilterPlugin";
import { ColorTransformPlugin } from "plugins/ColorTransformPlugin";
import { DropShadowFilterPlugin } from "plugins/DropShadowFilterPlugin";
import { FrameLabelPlugin } from "plugins/FrameLabelPlugin";
import { GlowFilterPlugin } from "plugins/GlowFilterPlugin";
import { HexColorsPlugin } from "plugins/HexColorsPlugin";
import { RoundPropsPlugin } from "plugins/RoundPropsPlugin";
import { ShortRotationPlugin } from "plugins/ShortRotationPlugin";
type int = number;
//class TweenMax
    
    export  class TweenMax extends TweenLite implements Object /* flash.events.IEventDispatcher */
    {
        constructor(arg1: Object, arg2: number, arg3: Object)
        {
            super(arg1, arg2, arg3);
            if (TweenLite.version < 11.2) 
            {
                throw new Error("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent TweenMax.version. Download updates at http://www.TweenMax.com.");
            }
            this.yoyo = Boolean(this.vars.yoyo);
            this._repeat = this.vars.repeat ? int(this.vars.repeat) : 0;
            this._repeatDelay = this.vars.repeatDelay ? Number(this.vars.repeatDelay) : 0;
            this.cacheIsDirty = true;
            if (this.vars.onCompleteListener || this.vars.onInitListener || this.vars.onUpdateListener || this.vars.onStartListener || this.vars.onRepeatListener || this.vars.onReverseCompleteListener) 
            {
                this.initDispatcher();
                if (arg2 == 0 && _delay == 0) 
                {
                    this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
                    this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
                }
            }
            if (this.vars.timeScale && !(this.target is TweenCore)) 
            {
                this.cachedTimeScale = this.vars.timeScale;
            }
            return;
        }

        public static killAll(arg1: Boolean=false, arg2: Boolean=true, arg3: Boolean=true): void
        {
            var loc2=false;
            var loc1;
            var loc3=(loc1 = TweenMax.getAllTweens()).length;
            while (--loc3 > -1) 
            {
                if (!((loc2 = loc1[loc3].target == loc1[loc3].vars.onComplete) == arg3 || !(loc2 == arg2))) 
                {
                    continue;
                }
                if (arg1) 
                {
                    loc1[loc3].complete(false);
                    continue;
                }
                loc1[loc3].setEnabled(false, false);
            }
            return;
        }

        public static killChildTweensOf(arg1: Object /* flash.display.DisplayObjectContainer */, arg2: Boolean=false): void
        {
            var loc2=null;
            var loc3=null;
            var loc1=TweenMax.getAllTweens();
            var loc4=loc1.length;
            while (--loc4 > -1) 
            {
                if (!((loc2 = loc1[loc4].target) is flash.display.DisplayObject)) 
                {
                    continue;
                }
                loc3 = loc2.parent;
                while (loc3) 
                {
                    if (loc3 == arg1) 
                    {
                        if (arg2) 
                        {
                            loc1[loc4].complete(false);
                        }
                        else 
                        {
                            loc1[loc4].setEnabled(false, false);
                        }
                    }
                    loc3 = loc3.parent;
                }
            }
            return;
        }

        public static pauseAll(arg1: Boolean=true, arg2: Boolean=true): void
        {
            TweenMax.changePause(true, arg1, arg2);
            return;
        }

        public static resumeAll(arg1: Boolean=true, arg2: Boolean=true): void
        {
            TweenMax.changePause(false, arg1, arg2);
            return;
        }

        /* internal  */static changePause(arg1: Boolean, arg2: Boolean=true, arg3: Boolean=false): void
        {
            var loc2=false;
            var loc1;
            var loc3=(loc1 = TweenMax.getAllTweens()).length;
            while (--loc3 > -1) 
            {
                if (!((loc2 = TweenLite(loc1[loc3]).target == TweenLite(loc1[loc3]).vars.onComplete) == arg3 || !(loc2 == arg2))) 
                {
                    continue;
                }
                TweenCore(loc1[loc3]).paused = arg1;
            }
            return;
        }

        public static get globalTimeScale(): number
        {
            return TweenLite.rootTimeline != null ? TweenLite.rootTimeline.cachedTimeScale : 1;
        }

        public setDestination(arg1: string, arg2, arg3: Boolean=true): void
        {
            var loc1;
            (loc1 = {})[arg1] = arg2;
            this.updateTo(loc1, !arg3);
            return;
        }

        public static set globalTimeScale(arg1: number)
        {
            if (arg1 == 0) 
            {
                arg1 = 0.0001;
            }
            if (TweenLite.rootTimeline == null) 
            {
                TweenLite.to({}, 0, {});
            }
            var loc1=TweenLite.rootTimeline;
            var loc2=flash.utils.getTimer() * 0.001;
            loc1.cachedStartTime = loc2 - (loc2 - loc1.cachedStartTime) * loc1.cachedTimeScale / arg1;
            loc1 = TweenLite.rootFramesTimeline;
            loc2 = TweenLite.rootFrame;
            loc1.cachedStartTime = loc2 - (loc2 - loc1.cachedStartTime) * loc1.cachedTimeScale / arg1;
            var loc3;
            TweenLite.rootTimeline.cachedTimeScale = loc3 = arg1;
            TweenLite.rootFramesTimeline.cachedTimeScale = loc3;
            return;
        }

        protected /* override */ init(): void
        {
            var loc1=null;
            var loc2=0;
            var loc3=null;
            var loc4=null;
            var loc5=null;
            var loc6=null;
            var loc7=null;
            var loc8=null;
            var loc9=0;
            if (this.vars.startAt) 
            {
                this.vars.startAt.overwrite = 0;
                this.vars.startAt.immediateRender = true;
                loc1 = new TweenMax(this.target, 0, this.vars.startAt);
            }
            if (this._dispatcher) 
            {
                this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.INIT));
            }
            super.init();
            if (_ease in fastEaseLookup) 
            {
                this._easeType = fastEaseLookup[_ease][0];
                this._easePower = fastEaseLookup[_ease][1];
            }
            if (!(this.vars.roundProps == null) && "roundProps" in TweenLite.plugins) 
            {
                loc9 = (loc5 = this.vars.roundProps).length;
                while (--loc9 > -1) 
                {
                    loc3 = loc5[loc9];
                    loc8 = this.cachedPT1;
                    while (loc8) 
                    {
                        if (loc8.name != loc3) 
                        {
                            if (loc8.isPlugin && loc8.name == "_MULTIPLE_" && !loc8.target.round) 
                            {
                                if ((loc4 = " " + loc8.target.overwriteProps.join(" ") + " ").indexOf(" " + loc3 + " ") != -1) 
                                {
                                    loc8.target.round = true;
                                }
                            }
                        }
                        else if (loc8.isPlugin) 
                        {
                            loc8.target.round = true;
                        }
                        else 
                        {
                            if (loc6 != null) 
                            {
                                loc6.add(loc8.target, loc3, loc8.start, loc8.change);
                            }
                            else 
                            {
                                (loc6 = new TweenLite.plugins.roundProps()).add(loc8.target, loc3, loc8.start, loc8.change);
                                _hasPlugins = true;
                                var loc10;
                                loc7 = loc10 = this.insertPropTween(loc6, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1);
                                this.cachedPT1 = loc10;
                            }
                            this.removePropTween(loc8);
                            this.propTweenLookup[loc3] = loc7;
                        }
                        loc8 = loc8.nextNode;
                    }
                }
            }
            return;
        }

        protected insertPropTween(arg1: Object, arg2: string, arg3: number, arg4, arg5: string, arg6: Boolean, arg7: PropTween): PropTween
        {
            var loc2=null;
            var loc3=0;
            var loc1=new PropTween(arg1, arg2, arg3, typeof arg4 != "number" ? Number(arg4) : arg4 - arg3, arg5, arg6, arg7);
            if (arg6 && arg5 == "_MULTIPLE_") 
            {
                loc3 = (loc2 = arg1.overwriteProps).length;
                while (--loc3 > -1) 
                {
                    this.propTweenLookup[loc2[loc3]] = loc1;
                }
            }
            else 
            {
                this.propTweenLookup[arg5] = loc1;
            }
            return loc1;
        }

        protected removePropTween(arg1: PropTween): Boolean
        {
            if (arg1.nextNode) 
            {
                arg1.nextNode.prevNode = arg1.prevNode;
            }
            if (arg1.prevNode) 
            {
                arg1.prevNode.nextNode = arg1.nextNode;
            }
            else if (this.cachedPT1 == arg1) 
            {
                this.cachedPT1 = arg1.nextNode;
            }
            if (arg1.isPlugin && arg1.target.onDisable) 
            {
                arg1.target.onDisable();
                if (arg1.target.activeDisable) 
                {
                    return true;
                }
            }
            return false;
        }

        public /* override */ invalidate(): void
        {
            this.yoyo = Boolean(this.vars.yoyo == true);
            this._repeat = this.vars.repeat ? Number(this.vars.repeat) : 0;
            this._repeatDelay = this.vars.repeatDelay ? Number(this.vars.repeatDelay) : 0;
            this._hasUpdateListener = false;
            if (!(this.vars.onCompleteListener == null) || !(this.vars.onUpdateListener == null) || !(this.vars.onStartListener == null)) 
            {
                this.initDispatcher();
            }
            setDirtyCache(true);
            super.invalidate();
            return;
        }

        public updateTo(arg1: Object, arg2: Boolean=false): void
        {
            var loc2=null;
            var loc3=NaN;
            var loc4=null;
            var loc5=NaN;
            var loc1=this.ratio;
            if (arg2 && !(this.timeline == null) && this.cachedStartTime < this.timeline.cachedTime) 
            {
                this.cachedStartTime = this.timeline.cachedTime;
                this.setDirtyCache(false);
                if (this.gc) 
                {
                    this.setEnabled(true, false);
                }
                else 
                {
                    this.timeline.addChild(this);
                }
            }
            var loc6=0;
            var loc7=arg1;
            for (loc2 in loc7) 
            {
                this.vars[loc2] = arg1[loc2];
            }
            if (this.initted) 
            {
                this.initted = false;
                if (!arg2) 
                {
                    this.init();
                    if (!arg2 && this.cachedTime > 0 && this.cachedTime < this.cachedDuration) 
                    {
                        loc3 = 1 / (1 - loc1);
                        loc4 = this.cachedPT1;
                        while (loc4) 
                        {
                            loc5 = loc4.start + loc4.change;
                            loc4.change = loc4.change * loc3;
                            loc4.start = loc5 - loc4.change;
                            loc4 = loc4.nextNode;
                        }
                    }
                }
            }
            return;
        }

        
        {
            TweenMax._overwriteMode = OverwriteManager.enabled ? OverwriteManager.mode : OverwriteManager.init(2);
            TweenMax.killTweensOf = TweenLite.killTweensOf;
            TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
            TweenPlugin.activate([AutoAlphaPlugin, EndArrayPlugin, FramePlugin, RemoveTintPlugin, TintPlugin, VisiblePlugin, VolumePlugin, BevelFilterPlugin, BezierPlugin, BezierThroughPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, ColorTransformPlugin, DropShadowFilterPlugin, FrameLabelPlugin, GlowFilterPlugin, HexColorsPlugin, RoundPropsPlugin, ShortRotationPlugin, {}]);
        }

        public killProperties(arg1: Array<any>): void
        {
            var loc1={};
            var loc2=arg1.length;
            while (--loc2 > -1) 
            {
                loc1[arg1[loc2]] = true;
            }
            killVars(loc1);
            return;
        }

        public /* override */ renderTime(arg1: number, arg2: Boolean=false, arg3: Boolean=false): void
        {
            var loc3=false;
            var loc4=false;
            var loc5=false;
            var loc7=NaN;
            var loc8=0;
            var loc9=0;
            var loc10=NaN;
            var loc1=this.cacheIsDirty ? this.totalDuration : this.cachedTotalDuration;
            var loc2=this.cachedTime;
            if (arg1 >= loc1) 
            {
                this.cachedTotalTime = loc1;
                this.cachedTime = this.cachedDuration;
                this.ratio = 1;
                loc3 = true;
                if (this.cachedDuration == 0) 
                {
                    if ((arg1 == 0 || _rawPrevTime < 0) && !(_rawPrevTime == arg1)) 
                    {
                        arg3 = true;
                    }
                    _rawPrevTime = arg1;
                }
            }
            else if (arg1 <= 0) 
            {
                if (arg1 < 0) 
                {
                    this.active = false;
                    if (this.cachedDuration == 0) 
                    {
                        if (_rawPrevTime > 0) 
                        {
                            arg3 = true;
                            loc3 = true;
                        }
                        _rawPrevTime = arg1;
                    }
                }
                var loc11;
                this.ratio = loc11 = 0;
                this.cachedTime = loc11 = loc11;
                this.cachedTotalTime = loc11;
                if (this.cachedReversed && !(loc2 == 0)) 
                {
                    loc3 = true;
                }
            }
            else 
            {
                this.cachedTime = loc11 = arg1;
                this.cachedTotalTime = loc11;
                loc5 = true;
            }
            if (this._repeat != 0) 
            {
                loc7 = this.cachedDuration + this._repeatDelay;
                if (loc3) 
                {
                    if (this.yoyo && this._repeat % 2) 
                    {
                        this.ratio = loc11 = 0;
                        this.cachedTime = loc11;
                    }
                }
                else if (arg1 > 0) 
                {
                    loc8 = this._cyclesComplete;
                    this._cyclesComplete = int(this.cachedTotalTime / loc7);
                    if (this._cyclesComplete == this.cachedTotalTime / loc7) 
                    {
                        var loc12=((loc11 = this)._cyclesComplete - 1);
                        loc11._cyclesComplete = loc12;
                    }
                    if (loc8 != this._cyclesComplete) 
                    {
                        loc4 = true;
                    }
                    this.cachedTime = (this.cachedTotalTime / loc7 - this._cyclesComplete) * loc7;
                    if (this.yoyo && this._cyclesComplete % 2) 
                    {
                        this.cachedTime = this.cachedDuration - this.cachedTime;
                    }
                    else if (this.cachedTime >= this.cachedDuration) 
                    {
                        this.cachedTime = this.cachedDuration;
                        this.ratio = 1;
                        loc5 = false;
                    }
                    if (this.cachedTime <= 0) 
                    {
                        this.ratio = loc11 = 0;
                        this.cachedTime = loc11;
                        loc5 = false;
                    }
                }
            }
            if (loc2 == this.cachedTime && !arg3) 
            {
                return;
            }
            if (!this.initted) 
            {
                this.init();
            }
            if (!this.active && !this.cachedPaused) 
            {
                this.active = true;
            }
            if (loc5) 
            {
                if (this._easeType) 
                {
                    loc9 = this._easePower;
                    loc10 = this.cachedTime / this.cachedDuration;
                    if (this._easeType != 2) 
                    {
                        if (this._easeType != 1) 
                        {
                            if (loc10 < 0.5) 
                            {
                                loc10 = loc11 = loc10 * 2;
                                this.ratio = loc11;
                                while (--loc9 > -1) 
                                {
                                    this.ratio = loc10 * this.ratio;
                                }
                                this.ratio = this.ratio * 0.5;
                            }
                            else 
                            {
                                loc10 = loc11 = (1 - loc10) * 2;
                                this.ratio = loc11;
                                while (--loc9 > -1) 
                                {
                                    this.ratio = loc10 * this.ratio;
                                }
                                this.ratio = 1 - 0.5 * this.ratio;
                            }
                        }
                        else 
                        {
                            this.ratio = loc10;
                            while (--loc9 > -1) 
                            {
                                this.ratio = loc10 * this.ratio;
                            }
                        }
                    }
                    else 
                    {
                        loc10 = loc11 = 1 - loc10;
                        this.ratio = loc11;
                        while (--loc9 > -1) 
                        {
                            this.ratio = loc10 * this.ratio;
                        }
                        this.ratio = 1 - this.ratio;
                    }
                }
                else 
                {
                    this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
                }
            }
            if (loc2 == 0 && !(this.cachedTotalTime == 0) && !arg2) 
            {
                if (this.vars.onStart) 
                {
                    this.vars.onStart.apply(null, this.vars.onStartParams);
                }
                if (this._dispatcher) 
                {
                    this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
                }
            }
            var loc6=this.cachedPT1;
            while (loc6) 
            {
                loc6.target[loc6.property] = loc6.start + this.ratio * loc6.change;
                loc6 = loc6.nextNode;
            }
            if (_hasUpdate && !arg2) 
            {
                this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
            }
            if (this._hasUpdateListener && !arg2) 
            {
                this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
            }
            if (loc3) 
            {
                if (_hasPlugins && this.cachedPT1) 
                {
                    onPluginEvent("onComplete", this);
                }
                this.complete(true, arg2);
            }
            else if (loc4 && !arg2) 
            {
                if (this.vars.onRepeat) 
                {
                    this.vars.onRepeat.apply(null, this.vars.onRepeatParams);
                }
                if (this._dispatcher) 
                {
                    this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
                }
            }
            return;
        }

        public /* override */ complete(arg1: Boolean=false, arg2: Boolean=false): void
        {
            super.complete(arg1, arg2);
            if (!arg2 && this._dispatcher) 
            {
                if (this.cachedTotalTime == this.cachedTotalDuration && !this.cachedReversed) 
                {
                    this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
                }
                else if (this.cachedReversed && this.cachedTotalTime == 0) 
                {
                    this._dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE));
                }
            }
            return;
        }

        protected initDispatcher(): void
        {
            if (this._dispatcher == null) 
            {
                this._dispatcher = new Object /* flash.events.EventDispatcher */(this);
            }
            if (typeof this.vars.onInitListener === "function") 
            {
                this._dispatcher.addEventListener(TweenEvent.INIT, this.vars.onInitListener, false, 0, true);
            }
            if (typeof this.vars.onStartListener === "function") 
            {
                this._dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
            }
            if (typeof this.vars.onUpdateListener === "function") 
            {
                this._dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
                this._hasUpdateListener = true;
            }
            if (typeof this.vars.onCompleteListener === "function") 
            {
                this._dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
            }
            if (typeof this.vars.onRepeatListener === "function") 
            {
                this._dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true);
            }
            if (typeof this.vars.onReverseCompleteListener === "function") 
            {
                this._dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true);
            }
            return;
        }

        public addEventListener(arg1: string, arg2: Function, arg3: Boolean=false, arg4: int=0, arg5: Boolean=false): void
        {
            if (this._dispatcher == null) 
            {
                this.initDispatcher();
            }
            if (arg1 == TweenEvent.UPDATE) 
            {
                this._hasUpdateListener = true;
            }
            this._dispatcher.addEventListener(arg1, arg2, arg3, arg4, arg5);
            return;
        }

        public removeEventListener(arg1: string, arg2: Function, arg3: Boolean=false): void
        {
            if (this._dispatcher) 
            {
                this._dispatcher.removeEventListener(arg1, arg2, arg3);
            }
            return;
        }

        public hasEventListener(arg1: string): Boolean
        {
            return this._dispatcher != null ? this._dispatcher.hasEventListener(arg1) : false;
        }

        public willTrigger(arg1: string): Boolean
        {
            return this._dispatcher != null ? this._dispatcher.willTrigger(arg1) : false;
        }

        public dispatchEvent(arg1: Object /* flash.events.Event */): Boolean
        {
            return this._dispatcher != null ? this._dispatcher.dispatchEvent(arg1) : false;
        }

        public TweenMax.get currentProgress(): number
        {
            return this.cachedTime / this.duration;
        }

        public TweenMax.set currentProgress(arg1: number)
        {
            if (this._cyclesComplete != 0) 
            {
                setTotalTime(this.duration * arg1 + this._cyclesComplete * this.cachedDuration, false);
            }
            else 
            {
                setTotalTime(this.duration * arg1, false);
            }
            return;
        }

        public TweenMax.get totalProgress(): number
        {
            return this.cachedTotalTime / this.totalDuration;
        }

        public TweenMax.set totalProgress(arg1: number)
        {
            setTotalTime(this.totalDuration * arg1, false);
            return;
        }

        public /* override */ set currentTime(arg1: number)
        {
            if (this._cyclesComplete != 0) 
            {
                if (this.yoyo && this._cyclesComplete % 2 == 1) 
                {
                    arg1 = this.duration - arg1 + this._cyclesComplete * (this.cachedDuration + this._repeatDelay);
                }
                else 
                {
                    arg1 = arg1 + this._cyclesComplete * (this.duration + this._repeatDelay);
                }
            }
            setTotalTime(arg1, false);
            return;
        }

        public /* override */ get totalDuration(): number
        {
            if (this.cacheIsDirty) 
            {
                this.cachedTotalDuration = this._repeat != -1 ? this.cachedDuration * (this._repeat + 1) + this._repeatDelay * this._repeat : 999999999999;
                this.cacheIsDirty = false;
            }
            return this.cachedTotalDuration;
        }

        public /* override */ set totalDuration(arg1: number)
        {
            if (this._repeat == -1) 
            {
                return;
            }
            this.duration = (arg1 - this._repeat * this._repeatDelay) / (this._repeat + 1);
            return;
        }

        public TweenMax.get timeScale(): number
        {
            return this.cachedTimeScale;
        }

        public TweenMax.set timeScale(arg1: number)
        {
            if (arg1 == 0) 
            {
                arg1 = 0.0001;
            }
            var loc1=_pauseTime || _pauseTime == 0 ? _pauseTime : this.timeline.cachedTotalTime;
            this.cachedStartTime = loc1 - (loc1 - this.cachedStartTime) * this.cachedTimeScale / arg1;
            this.cachedTimeScale = arg1;
            setDirtyCache(false);
            return;
        }

        public TweenMax.get repeat(): int
        {
            return this._repeat;
        }

        public TweenMax.set repeat(arg1: int)
        {
            this._repeat = arg1;
            setDirtyCache(true);
            return;
        }

        public TweenMax.get repeatDelay(): number
        {
            return this._repeatDelay;
        }

        public TweenMax.set repeatDelay(arg1: number)
        {
            this._repeatDelay = arg1;
            setDirtyCache(true);
            return;
        }

        public static to(arg1: Object, arg2: number, arg3: Object): TweenMax
        {
            return new TweenMax(arg1, arg2, arg3);
        }

        public static from(arg1: Object, arg2: number, arg3: Object): TweenMax
        {
            arg3.runBackwards = true;
            if (!("immediateRender" in arg3)) 
            {
                arg3.immediateRender = true;
            }
            return new TweenMax(arg1, arg2, arg3);
        }

        public static fromTo(arg1: Object, arg2: number, arg3: Object, arg4: Object): TweenMax
        {
            arg4.startAt = arg3;
            if (arg3.immediateRender) 
            {
                arg4.immediateRender = true;
            }
            return new TweenMax(arg1, arg2, arg4);
        }

        public static allTo(arg1: Array<any>, arg2: number, arg3: Object, arg4: number=0, arg5: Function=null, arg6: Array<any>=null): Array<any>
        {
            var targets: Array<any>;
            var duration: number;
            var vars: Object;
            var stagger: number=0;
            var onCompleteAll: Function=null;
            var onCompleteAllParams: Array<any>=null;
            var i: int;
            var varsDup: Object;
            var p: string;
            var l: uint;
            var a: Array<any>;
            var curDelay: number;
            var onCompleteProxy: Function;
            var onCompleteParamsProxy: Array<any>;
            var lastIndex: int;

            var loc1;
            i = 0;
            varsDup = null;
            p = null;
            onCompleteProxy = null;
            onCompleteParamsProxy = null;
            targets = arg1;
            duration = arg2;
            vars = arg3;
            stagger = arg4;
            onCompleteAll = arg5;
            onCompleteAllParams = arg6;
            l = targets.length;
            a = [];
            curDelay = "delay" in vars ? Number(vars.delay) : 0;
            onCompleteProxy = vars.onComplete;
            onCompleteParamsProxy = vars.onCompleteParams;
            lastIndex = stagger <= 0 ? 0 : (l - 1);
            i = 0;
            while (i < l) 
            {
                varsDup = {};
                var loc2=0;
                var loc3=vars;
                for (p in loc3) 
                {
                    varsDup[p] = vars[p];
                }
                varsDup.delay = curDelay;
                if (i == lastIndex && !(onCompleteAll == null)) 
                {
                    varsDup.onComplete = (): void
                    {
                        if (onCompleteProxy != null) 
                        {
                            onCompleteProxy.apply(null, onCompleteParamsProxy);
                        }
                        onCompleteAll.apply(null, onCompleteAllParams);
                        return;
                    }
                }
                a[a.length] = new TweenMax(targets[i], duration, varsDup);
                curDelay = curDelay + stagger;
                ++i;
            }
            return a;
        }

        public static allFrom(arg1: Array<any>, arg2: number, arg3: Object, arg4: number=0, arg5: Function=null, arg6: Array<any>=null): Array<any>
        {
            arg3.runBackwards = true;
            if (!("immediateRender" in arg3)) 
            {
                arg3.immediateRender = true;
            }
            return TweenMax.allTo(arg1, arg2, arg3, arg4, arg5, arg6);
        }

        public static allFromTo(arg1: Array<any>, arg2: number, arg3: Object, arg4: Object, arg5: number=0, arg6: Function=null, arg7: Array<any>=null): Array<any>
        {
            arg4.startAt = arg3;
            if (arg3.immediateRender) 
            {
                arg4.immediateRender = true;
            }
            return TweenMax.allTo(arg1, arg2, arg4, arg5, arg6, arg7);
        }

        public static delayedCall(arg1: number, arg2: Function, arg3: Array<any>=null, arg4: Boolean=false): TweenMax
        {
            return new TweenMax(arg2, 0, {"delay": arg1, "onComplete": arg2, "onCompleteParams": arg3, "immediateRender": false, "useFrames": arg4, "overwrite": 0});
        }

        public static getTweensOf(arg1: Object): Array<any>
        {
            var loc3=0;
            var loc4=0;
            var loc1=masterList[arg1];
            var loc2=[];
            if (loc1) 
            {
                loc3 = loc1.length;
                loc4 = 0;
                while (--loc3 > -1) 
                {
                    if (loc1[loc3].gc) 
                    {
                        continue;
                    }
                    var loc5;
                    loc2[loc5 = loc4++] = loc1[loc3];
                }
            }
            return loc2;
        }

        public static isTweening(arg1: Object): Boolean
        {
            var loc3=null;
            var loc1=TweenMax.getTweensOf(arg1);
            var loc2=loc1.length;
            while (--loc2 > -1) 
            {
                if (!((loc3 = loc1[loc2]).active || loc3.cachedStartTime == loc3.timeline.cachedTime && loc3.timeline.active)) 
                {
                    continue;
                }
                return true;
            }
            return false;
        }

        public static getAllTweens(): Array<any>
        {
            var loc4=null;
            var loc5=0;
            var loc1=masterList;
            var loc2=0;
            var loc3=[];
            var loc6=0;
            var loc7=loc1;
            for(loc4 of loc7) 
            {
                loc5 = loc4.length;
                while (--loc5 > -1) 
                {
                    if (TweenLite(loc4[loc5]).gc) 
                    {
                        continue;
                    }
                    var loc8;
                    loc3[loc8 = loc2++] = loc4[loc5];
                }
            }
            return loc3;
        }

        public static /* const */version: number=11.37;

        protected /* var */_dispatcher: Object /* flash.events.EventDispatcher */;

        protected /* var */_hasUpdateListener: Boolean;

        protected /* var */_repeat: int=0;

        protected /* var */_repeatDelay: number=0;

        protected /* var */_cyclesComplete: uint=0;

        protected /* var */_easePower: uint;

        public /* var */yoyo: Boolean;

        protected /* var */_easeType: uint;

        public static /* var */killTweensOf: Function;

        public static /* var */killDelayedCallsTo: Function;

        private static /* var */_overwriteMode: int;
    }
